package com.castle.fortress.admin.study.course.mapper;

import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.castle.fortress.admin.study.course.entity.StudyCourseChapterCoursewareEntity;
import java.util.Map;
import java.util.List;
/**
 * 章节课件表Mapper 接口
 *
 * @author castle
 * @since 2023-01-31
 */
public interface StudyCourseChapterCoursewareMapper extends BaseMapper<StudyCourseChapterCoursewareEntity> {

    /**
    * 扩展信息列表
    * @param pageMap
    * @param studyCourseChapterCoursewareEntity
    * @return
    */
    List<StudyCourseChapterCoursewareEntity> extendsList(@Param("map")Map<String, Long> pageMap, @Param("studyCourseChapterCoursewareEntity") StudyCourseChapterCoursewareEntity studyCourseChapterCoursewareEntity);

    /**
    * 扩展信息记录总数
    * @param studyCourseChapterCoursewareEntity
    * @return
    */
    Long extendsCount(@Param("studyCourseChapterCoursewareEntity") StudyCourseChapterCoursewareEntity studyCourseChapterCoursewareEntity);

    /**
    * 章节课件表扩展详情
    * @param id 章节课件表id
    * @return
    */
    StudyCourseChapterCoursewareEntity getByIdExtends(@Param("id")Long id);


    void delByCourseId(@Param("courseId")Long courseId);

    void delByCoursewareId(@Param("id")Long id);

    void delByCoursewareIds(@Param("ids")List<Long> ids);

    void delByCourseIds(@Param("ids")List<Long> courseIds);

    List<StudyCourseChapterCoursewareEntity> findByCoursewareId(@Param("coursewareId") Long coursewareId);

    List<StudyCourseChapterCoursewareEntity> findByCoursewareIds(@Param("ids") List<Long> ids);

}
